module.exports = {
  configureWebpack: config => {
    if (process.env.NODE_ENV !== 'production') {
      return {
        devServer: {
          disableHostCheck: true,
        },
      }
    }
  },
  css: {
    loaderOptions: {
      // 给 sass-loader 传递选项
      sass: {
        data: `@import "@/assets/css/mixin.scss";`,
      },
    },
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'https://xcore.yuanqicao.com',
        changeOrigin: true
      }
    }
  },
  assetsDir: 'static',
  productionSourceMap: false,
  baseUrl: process.env.NODE_ENV === 'production' ? '/' : '/',
}
